#include <my_head.h>
int main(int argc, char const *argv[])
{
    if(3 != argc){
        printf("Usage : %s src_file dest_file\n", argv[0]);
        return -1;
    }
    FILE *fp_r = fopen(argv[1], "r");
    if(NULL == fp_r)
        ERR_LOG("fopen error");
    FILE *fp_w = fopen(argv[2], "w");
    if(NULL == fp_w)
        ERR_LOG("fopen error");
        char buff[10]={0};
    while(NULL != fgets(buff,sizeof(buff),fp_r)){   //只能操作有效字符的文本文件
        fputs(buff,fp_w);
    }
    fclose(fp_r);
    fclose(fp_w);
    return 0;
}
